import axios from 'axios'

//上传md方法
export function postMd(userToken,title,sort,name,typeId,content){
    return  axios.post('/saveMd', {
        userToken:userToken,    
        title:title,
        sort:sort,
        name: name,
        typeId: typeId,
        content: content
     })
     .then(function (response) {
        console.log(response);
     })
     .catch(function (error) {
        console.log(error);
     });
}
//上传图片
export const uploadFile = (params) => {
    return axios({
      method: 'post',
      url: `/uploadFile`,
      data: params,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    });
  }

  export function ChangeMd(title,sort,typeId,blogId,content){
    return  axios.post('/ChangeMd', { 
        title:title,
        sort:sort,
        typeId: typeId,
        blogId:blogId,
        content: content
     })
     .then(function (response) {
        console.log(response);
     })
     .catch(function (error) {
        console.log(error);
     });
}

